#ifndef __PLATFORM_OBULLET_DEF_H__
#define __PLATFORM_OBULLET_DEF_H__

class oFace;
class oBodyDef;
class oWorld;
class oGroup;

namespace platform
{
	class oBullet;
	class oUnit;

	class oDLL oBulletDef: public CCObject
	{
	public:
		virtual ~oBulletDef();
		void setVelocity(float angle, float speed);
		PROPERTY_REF(b2Vec2, _velocity, Velocity);
		PROPERTY_NAME(bool, IsHighSpeed);
		PROPERTY_NAME(float, GravityScale);
		PROPERTY(oFace*, _face, Face);
		uint32 type;
		int endEffect;
		float lifeTime;
		float damageRadius;
		static oBulletDef* create();
		void setAsCircle(float radius);
		oBodyDef* getBodyDef() const;
		oBullet* toBullet(oWorld* world, oUnit* unit);
		static const int SENSOR_TAG;
	protected:
		oBulletDef();
		oBodyDef* _bodyDef;
	};
}

#endif